package com.servicesystem.servicesystem.untis.token;

import com.servicesystem.servicesystem.untis.R;
import io.jsonwebtoken.ExpiredJwtException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler({CustomException.class, ExpiredJwtException.class})
    public R customExceptionHandler(CustomException customException) {
        return R.fail(403, "token不可用");
    }
}
